﻿using Authentication.Configuration;
using Authentication.Model.Model;
using Authentication.Web.Service;
using Common.Contract;
using Common.Contract.Authentication;
using Common.Contract.Authentication.Record;
using Common.Contract.Authentication.Request;
using Common.Contract.Paging;
using Common.Service;
using Common.Service.DataTables;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Web.Mvc;

namespace Authentication.Web.Controller
{
    public class HomeController : ControllerBase
    {
        //[Authorize]
        public ActionResult Index()
        {
            //var applications = Provider.Applications.RetrieveApplications();
            //var n = applications.Count();
            using (ServiceClient<IAuthentication> serviceClient = new ServiceClient<IAuthentication>())
            {
                RetrieveObjectsRequest request = new RetrieveObjectsRequest
                {
                    Header = new RequestHeaderRecord
                    {
                        ApplicationKey = SystemConfiguration.ApplicationKey,
                        CallerName = "Authentication.Web.Controller.HomeController.Index"
                    }
                };
                var xx = serviceClient.Proxy.RetrieveObjects(request);
            }
            return View();
        }
    }
}
